#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <SceneGraph/renderable.h>
#include <string>
using namespace PhysLeo;
namespace py = pybind11;

class PyRenderable : public Renderable
{
public:
    using Renderable::Renderable;

    void initGlResource() override
    {
        PYBIND11_OVERLOAD_PURE(void, Renderable, initGlResource, );
    }

    void draw(CameraInterface &camera) override
    {
        PYBIND11_OVERLOAD_PURE(void, Renderable, draw, camera);
    }
};

void initRenderable(py::module &mod)
{
    using class_type = Renderable;
    using helper_type = PyRenderable;
    auto pyclass_name = std::string("Renderable");
    py::class_<class_type, helper_type, std::shared_ptr<class_type>>cls(mod, pyclass_name.c_str());

    cls.def(py::init<>());
    cls.def("initGlResource", &class_type::initGlResource);
    cls.def("draw", &class_type::draw);
}
